//
//  MCPullMenuCollectionViewCell.m
//  TLYLSF
//
//  Created by Canny on 2017/6/7.
//  Copyright © 2017年 MC. All rights reserved.
//

#import "MCPullMenuCollectionViewCell.h"
@interface MCPullMenuCollectionViewCell ()
@property (nonatomic,strong)UILabel *lab_title;
@property (nonatomic,strong)UIImageView * imgV_duigou;


@end

@implementation MCPullMenuCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self){
        [self initView];
    }
    return self;
}
-(void)setDataSource:(id)dataSource{
    _dataSource=dataSource;
    _lab_title.text =[dataSource objectForKey:@"name" ];
}

-(void)initView{
    self.backgroundColor = [UIColor clearColor];
    _lab_title =[[UILabel alloc]initWithFrame:CGRectZero];
    _lab_title.alpha=0.8;
    _lab_title.textColor=[UIColor whiteColor];
    _lab_title.font=[UIFont systemFontOfSize:15];
    _lab_title.text =@"加载中...";
    _lab_title.textAlignment=NSTextAlignmentCenter;
    [self  addSubview:_lab_title];
    [_lab_title mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
        
    }];
    
    _imgV_duigou=[[UIImageView alloc]init];
    [self addSubview:_imgV_duigou];
    _imgV_duigou.image=[UIImage imageNamed:@"Betting-sure-chose"];
    [_imgV_duigou mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_lab_title.mas_right).offset(5);
        make.centerY.equalTo(self.mas_centerY);
        make.height.mas_equalTo(13.6);
        make.width.mas_equalTo(14);
        
    }];
    _imgV_duigou.hidden=YES;
    
    
    
}
- (void)setSelected:(BOOL)selected{
    if (selected) {
        _lab_title.textColor=[UIColor colorWithRed:34/255.0 green:34/255.0 blue:34/255.0 alpha:1.0];
        _imgV_duigou.hidden=NO;
    }else{
        _lab_title.textColor=[UIColor whiteColor];
        _imgV_duigou.hidden=YES;
    }
}



@end













